home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / exec / addresource.c < prev    next >
C/C++ Source or Header  |  1996-10-24  |  2KB  |  74 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: addresource.c,v 1.5 1996/10/24 15:50:42 aros Exp $
  4.     $Log: addresource.c,v $
  5.     Revision 1.5  1996/10/24 15:50:42  aros
  6.     Use the official AROS macros over the __AROS versions.
  7.  
  8.     Revision 1.4  1996/08/13 13:55:56  digulla
  9.     Replaced AROS_LA by AROS_LHA
  10.     Replaced some AROS_LH*I by AROS_LH*
  11.     Sorted and added includes
  12.  
  13.     Revision 1.3  1996/08/01 17:41:02  digulla
  14.     Added standard header for all files
  15.  
  16.     Desc:
  17.     Lang: english
  18. */
  19. #include <exec/execbase.h>
  20. #include <aros/libcall.h>
  21.  
  22. /*****************************************************************************
  23.  
  24.     NAME */
  25.     #include <clib/exec_protos.h>
  26.  
  27.     AROS_LH1(void, AddResource,
  28.  
  29. /*  SYNOPSIS */
  30.     AROS_LHA(APTR, resource, A1),
  31.  
  32. /*  LOCATION */
  33.     struct ExecBase *, SysBase, 81, Exec)
  34.  
  35. /*  FUNCTION
  36.     Adds a given resource to the system's resource list.
  37.  
  38.     INPUTS
  39.     resource - Pointer to a ready for use resource.
  40.  
  41.     RESULT
  42.  
  43.     NOTES
  44.  
  45.     EXAMPLE
  46.  
  47.     BUGS
  48.  
  49.     SEE ALSO
  50.     RemResource(), OpenResource()
  51.  
  52.     INTERNALS
  53.  
  54.     HISTORY
  55.  
  56. ******************************************************************************/
  57. {
  58.     AROS_LIBFUNC_INIT
  59.  
  60.     /* Just in case the user forgot them */
  61.     ((struct Node *)resource)->ln_Type=NT_RESOURCE;
  62.  
  63.     /* Arbitrate for the resource list */
  64.     Forbid();
  65.  
  66.     /* And add the resource */
  67.     Enqueue(&SysBase->ResourceList,(struct Node *)resource);
  68.  
  69.     /* All done. */
  70.     Permit();
  71.     AROS_LIBFUNC_EXIT
  72. } /* AddResource */
  73.  
  74.